<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.prime.com.tr/ui">



<h:head>
	<title><h:outputText value="#{bundle['titulo_principal']}" /></title>

</h:head>

<h:body>
    		
    		<h:form id="formulario">
					 
    		<p:panel header="#{bundle['menu_esquemaclasseObjetonova']}" id="painel">
    		<p:messages />
    		<h:panelGrid columns="3" cellpadding="0" cellspacing="3">  
    		
				  <h:column>
				    <h:outputText value="#{bundle['lbl_nome']}"/>
				  </h:column>
				  <h:column>
					<p:inputText id="nome" size="18" value="#{controle.nome}" required="true"/>
				  </h:column>
				  <h:column>
				  	<p:message for="nome" />
				  </h:column>
				  
				  <h:column>
					<h:outputText value="#{bundle['lbl_descricao']}" />
				  </h:column>
				  <h:column>
				    <p:inputTextarea id="descricao" rows="2" maxHeight="400" style="font-size: 18px;" value="#{controle.classeDeObjeto.descricao}"/>
				  </h:column>
				  <h:column>
				  	<p:message for="descricao" />
				  </h:column>
				  
				  <h:column>
				    <h:outputText value="#{bundle['lbl_superior']}" />
				  </h:column>
				  <h:column>
				    <p:selectManyMenu id="superiorC" style="font-size: 14px; max-height: 200px;" value="#{controle.superiorC}">
					<f:selectItems value="#{controle.esquema.listas.clista}"  
                    var="Sclasseobjeto" itemLabel="#{Sclasseobjeto.nome}"  
                    itemValue="#{Sclasseobjeto.nome}" />
					</p:selectManyMenu>
				  </h:column>
				  <h:column>
				  	<p:message for="superiorC" />
				  </h:column>
				  
				  <h:column>
				    <h:outputText value="#{bundle['lbl_tipodeclasse']}" />
				  </h:column>
				  <h:column>
				    <p:selectOneMenu id="tipo" style="font-size: 14px; max-height: 200px; max-width: 100px;" value="#{controle.classeDeObjeto.tipo}">
					<f:selectItem itemLabel="Abstrata" itemValue="Abstrata" />
					<f:selectItem itemLabel="Estrutural" itemValue="Estrutural" />
					<f:selectItem itemLabel="Auxiliar" itemValue="Auxiliar" />
					</p:selectOneMenu>
				  </h:column>
				  <h:column>
				  	<p:message for="tipo" />
				  </h:column>
				  
				  <h:column>
				    <h:outputText value="#{bundle['lbl_atributosobrigatorios']}" />
				  </h:column>
				  <h:column>
				    <p:selectManyMenu id="atributosObrigatorios" style="font-size: 14px; max-height: 375px; min-width: 375px;" value="#{controle.deve}">
					<f:selectItems value="#{controle.esquema.listas.tlista}"
                    var="SOPtipodeatributo" itemLabel="#{SOPtipodeatributo.nome}"  
                    itemValue="#{SOPtipodeatributo.nome}" />
                    <f:selectItems value="#{controle.esquema.listas.slista}"
                    var="SOPsintaxe" itemLabel="#{SOPsintaxe.descricao}"  
                    itemValue="#{SOPsintaxe.descricao}" />
					</p:selectManyMenu>
				  </h:column>
				  <h:column>
				  	<p:message for="atributosObrigatorios" />
				  </h:column>
				  
				  <h:column>
				    <h:outputText value="#{bundle['lbl_atributosopcionais']}" />
				  </h:column>
				  <h:column>
				    <p:selectManyMenu id="atributosOpcionais" style="font-size: 14px; max-height: 375px; min-width: 375px;" value="#{controle.pode}">
					<f:selectItems value="#{controle.esquema.listas.tlista}"
                    var="SOPtipodeatributo" itemLabel="#{SOPtipodeatributo.nome}"  
                    itemValue="#{SOPtipodeatributo.nome}" />
                    <f:selectItems value="#{controle.esquema.listas.slista}"
                    var="SOPsintaxe" itemLabel="#{SOPsintaxe.descricao}"  
                    itemValue="#{SOPsintaxe.descricao}" />
					</p:selectManyMenu>
				  </h:column>
				  <h:column>
				  	<p:message for= "atributosOpcionais" />
				  </h:column>

				</h:panelGrid>
				
				
				<p:commandButton value="#{bundle['btn_salvar']}" image="ui-icon ui-icon-disk"
						update="painel" action="#{controle.salvarClasseDeObjeto}" 
            ajax="false"/>
				<p:commandButton value="#{bundle['btn_limpar']}" image="ui-icon ui-icon-close" 
						update="painel" action="#{controle.limpar}"/>
   				
			</p:panel> 
    		</h:form>   

    </h:body>
</html>